package com.tanhua.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.model.domain.Analysis;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.joda.time.DateTime;


public interface AnalysisMapper extends BaseMapper<Analysis> {

    @Select("select sum(num_registered) from tb_analysis;")
    Integer sum();


    @Select("select sum(${column}) from tb_analysis where record_date >= #{afterDate} and record_date <= #{nowDate}")
    Integer queryUserCount(@Param("column") String column,
                           @Param("nowDate") String nowDate,
                           @Param("afterDate") String afterDate);

}
